<h1>New Dunnage Material</h1>
<form method="POST" action="<?php echo $this->baseUrl()?>/admin/index/<?php echo $this->action ?>">
    <input type="hidden" name="id" value="<?php echo $this->id ?>" />
    <div class='wrap-content'>
        <label>
            Type
        </label>
        <div class='content'>  
            <div class='wrap-input'>
                <input value="<?php echo $this->type ?>" class="new_record" type="text" name="type"/>
                <?php echo $this->partial("/_partial/field_error.phtml", array('errors' => $this->errors, 'field' => 'type')) ?>                
            </div>
        </div>
    </div>
    <div class='wrap-content'>
        <label> Unit </label>
        <div class='content'>  
            <div class='wrap-input'>
                <select class="new_record" name="unit">
                    <?php foreach($this->units as $key => $value): ?>
                        <option <?php if($this->unit == $key):?> selected <?php endif?>   value="<?php echo $key?>"><?php echo $value?></option>
                    <?php endforeach ?>
                </select>
                <?php echo $this->partial("/_partial/field_error.phtml", array('errors' => $this->errors, 'field' => 'unit')) ?>                
            </div>
        </div>
    </div>   
    <div class='wrap-content'>
        <label> Price Per Unit </label>
        <div class='content'>  
            <div class='wrap-input'>
                <input value="<?php echo $this->price_per_unit ?>" class="new_record" type="text" name="price_per_unit"/> <span>USD</span>
                <?php echo $this->partial("/_partial/field_error.phtml", array('errors' => $this->errors, 'field' => 'price_per_unit')) ?>                
            </div>
            <div class='wrap-input'>
                <input class="submit-button" type="submit" name="Save" value="Save"/>
                <a href='<?php echo $this->baseUrl() ?>/admin/index/material?type=dunnage'>
                    <input type='button' class='submit-button' value='Cancel'/>
                </a>                
            </div>
        </div>
    </div>    
</form>
<style type="text/css">
    .new_record{
        width: 200px !important;
    }
    .left_new_record{
        margin-left: 10px !important;
    }
</style>
